package com.cuit.controller;


import com.cuit.common.Result;
import com.cuit.entity.Statistics;
import com.cuit.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class HomeController {

    @Autowired
    private HomeService homeService;

    @GetMapping("/statistics")
    public Result getStatistics() {
        Statistics statistics = homeService.getStatistics();
        return Result.success(statistics);
    }
}
